Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL-40693: netkvm lazy RX allocation of physical memory #1229

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ybendito
Copy link
Collaborator

No description provided.

This is preparation commit for lazy RX memory allocation.
Depending on number of RX buffer we calculate the kick limit
and low rx buffers limit. In future the number of RX buffers
become variable and will be incremented during lazy memory
allocation, so we will need to recalculate it at least several
times, so move it to separate procedure.

Signed-off-by: Yuri Benditovich <[email protected]>
@ybendito
Copy link
Collaborator Author

rerun tests

@@ -353,6 +354,7 @@ static VOID ParaNdis6_Halt(NDIS_HANDLE miniportAdapterContext, NDIS_HALT_ACTION
{
PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)miniportAdapterContext;
DEBUG_ENTRY(0);
pContext->systemThread.Stop();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about PM path like S4?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added commit for sync between power/reset flows and system thread actions

This procedure is to be called for lazy memory allocation,
it allocates more RX buffers if needed. Return value indicates
whether it should be called again for more allocations.

Signed-off-by: Yuri Benditovich <[email protected]>
Wrapper for process API system thread creation and stopping.

Signed-off-by: Yuri Benditovich <[email protected]>
Jira link: https://issues.redhat.com/browse/RHEL-40693
Start the thread when the initialization is finished
successfully, the thread starts allocate additional RX
memory. On disable - the first thing to do is to stop
the thread and wait until it is finished.

Signed-off-by: Yuri Benditovich <[email protected]>
Synchronize lazy allocation operations with power down,
power up, reset flows. Do the allocations only when the
device is powered up, defer them otherwise.

Signed-off-by: Yuri Benditovich <[email protected]>
Jira link: https://issues.redhat.com/browse/RHEL-40693
Initially allocate 16 buffers per RX queue, the rest of
the buffers will be allocated by the system thread.

Signed-off-by: Yuri Benditovich <[email protected]>
Change "bool Create" to "void Initialize", as the procedure
can't fail and does not create anything.

Signed-off-by: Yuri Benditovich <[email protected]>
Jira link: https://issues.redhat.com/browse/RHEL-40693
Currently we allocate 2x4K blocks for each TX descriptor.
Chnaging it to one allocation of 8K, the allocated block
is used exactly as before - 4K for headers area, 4K for
indirect area.

Signed-off-by: Yuri Benditovich <[email protected]>
Make lazy allocation configurable, enabled by default.

Signed-off-by: Yuri Benditovich <[email protected]>
Jira link: https://issues.redhat.com/browse/RHEL-40693
netkvm-wmi cfg has 2 additional metrics:
InitTimeMs - time to 'init done' indication
LazyAllocTimeMs - time to 'all allocations done'

Signed-off-by: Yuri Benditovich <[email protected]>
@ybendito
Copy link
Collaborator Author

rerun tests

@ybendito
Copy link
Collaborator Author

ybendito commented Jan 6, 2025

@kostyanf14 Can we please rerun just this test?
Win22x64: NDISTest 6.5 - [2 Machine] - InvalidPackets

@kostyanf14
Copy link
Member

@ybendito
Done HCK-CI/NetKVM-Win2022x64 (Fedora Linux 37, QEMU v9.0.0) (custom)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants